Code reader and code reading method for color image

ABSTRACT

A code reader for color images, which can simultaneously accept a one-dimensional code or a two-dimensional code and data of a color image of a subject for management and which can record both the data in mapping with each other, is provided. 
     The code reader comprises color image pickup means for picking up a code and also a color image of a subject for management as is specified by identification information contained in the code; code-recognizing-data extraction means for extracting luminance data from the color image data picked up by the color image pickup means, and for writing gray scale data into a first frame memory as data for recognizing the code; and recorded-image extraction means for extracting color data from the color image data picked up by the color image pickup means, and for writing the color data into a second frame memory as data for the original image of the subject for management.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a code reading apparatus and codereading method which read a one-dimensional or two-dimensional code innon-touching fashion. More particularly, it relates to a code readingapparatus and code reading method for color images, in which informationexpressed by the above code is recognized from a color image, and inwhich the recognized data of the pertinent code and the original colorimage data of a subject for management as specified by this code can berecorded in mapping with each other.

2. Description of the Related Art

In cases of copying and managing various kinds of printed matter, suchas deeds, newspapers, books and documents (hereinbelow, termed“information sources” or “subjects for management”), there has beenadopted a method wherein the subjects for management are managed usingmicrofilm, or a method wherein image data accepted by a scanner or thelike are recorded on a recording medium and are managed by employing acomputer. When the subjects for management as mentioned above are putinto the shape of a database so as to be retrievable by way of exampleand are managed by utilizing a computer, codes for specifying theindividual subjects for management are required. Although the codesdepend also upon the sorts of the subjects for management and thepurposes of the management, a code formed of the character strings ofclassification No., bond No., document No., a date, etc. is usuallyafforded in order to specify each of the subjects for management, andthe pertinent subject for management is recorded on a recording mediumand is managed in association with the identifying code. In this manner,the various information sources are managed by utilizing the computer,whereby the retrievals of the information sources are facilitated.Moreover, it is dispensed with to take copies of the information sourceson paper or the like and to keep the copies in custody, and a space forcustody can be made smaller.

Meanwhile, in recent years, one-dimensional or two-dimensional codes ineach of which the No., trade name, price and other information items ofa product or a component are symbolized by a bar pattern in, forexample, monochrome have been extensively employed in order to recognizethe Nos., trade names, prices and other information items of products orcomponents. Such one-dimensional codes or two-dimensional codesexpressed by the code patterns having different reflection factorsrepresent a series of numerals and characters in terms of thecombinations of the ratios between the widths of lines in, for example,white and black, and the Nos., trade names, prices and other informationitems of the products or components are replaced with the numerals andcharacters.

Therefore, in a case where the one-dimensional codes or two-dimensionalcodes are utilized as the above identifying codes for specifying thesubjects for management and where management information items arefurther included in the codes, the labor of inputting codes anew can besaved, and it is permitted to easily manage the images of the varioussubjects for management. A code reading apparatus for suchone-dimensional codes or two-dimensional codes recognizes each code froma white-and-black image (achromatic image), and it includes an imagingdevice for the white-and-black images as has a high resolution. Ingeneral, it is incarnated as an apparatus dedicated to the code reading.

Meanwhile, an example of an optical information reading apparatusfurnished with the function of reading images other than codes isdisclosed in the official gazette of Japanese Patent Laid-Open No.307886/1998. The apparatus disclosed in this official gazette(hereinbelow, termed the “prior-art example”) is such that an image tobe read and a two-dimensional code can be simultaneously accepted by asingle portable terminal. More specifically, the read port of a handyscanner is directed toward the sealing area 72 of a delivery slip 70 asshown in FIG. 1 by way of example, so as to read the two-dimensionalimage thereof, and two-dimensional image data (multi-valued image dataobtained by quantizing continuous density values) are stored in amulti-valued image memory as they are, while binary image data obtainedby binary-coding the multi-valued image data are stored in a two-valuedimage memory, whereupon the contents of both the memories aretransmitted to a host computer or the like. Besides, a two-dimensionalcode 74 existing in the sealing area 72 is decrypted on the basis of theabove binary image data, and the decrypted code data and thetwo-dimensional image data of the sealing area 72 can be recorded inassociation.

The apparatus disclosed in the prior-art example stated above decryptsthe code on the basis of the binary image data composed of the twolevels of “1” (high) and “0” (low), and it is effective in the case ofmanaging the achromatic information sources of the sealing information,etc. However, it is not applicable in a case where the informationsources are colored, and it has such a disadvantage that the range ofutilization is limited. In order to cope with color images, it isconsidered by way of example that a system in which the signal of any ofcolor components R, G and B is binary-coded into data for decrypting thecode is applied to the apparatus disclosed in the prior-art example.However, even when an imaging device of high resolution is employed, thesensitivity thereof lowers to 1/3, to pose the problem that coderecognition of high precision cannot be realized. Also considered is amethod in which a code reading apparatus such as bar code reader, and animage processing apparatus are unitarily constructed, but the methodposes the problems that the whole apparatus becomes large in size andthat it becomes expensive.

SUMMARY OF THE INVENTION

The present invention has been made in view of the above circumstances,and it has for its object to provide a code reading apparatus capable ofcoping with color images, which can simultaneously accept aone-dimensional code or two-dimensional code and the data of the colorimage of a subject for management, and which can record both the data inmapping with each other. Another object is to provide a code readingapparatus and method for color images, which has a high precision forrecognizing a code, which is inexpensive and which is small in size.

The present invention concerns a code reading apparatus and method whichread a one-dimensional or two-dimensional code in non-touching fashion.Regarding the apparatus, the objects of the present invention areaccomplished by comprising color image pickup means for picking up thecode and also a color image of a subject for management as is specifiedby identification information contained in said code;code-recognizing-data extraction means for extracting luminance datafrom the color image data picked up by said color image pickup means,and for writing gray scale data into a first frame memory as data forrecognizing said code; and recorded-image extraction means forextracting color data from said color image data picked up by said colorimage pickup means, and for writing the color data into a second framememory as data for the original image of the subject for management.

Further, the objects are accomplished more effectively by each of acontrivance in which said code-recognizing-data extraction meansextracts the luminance data in such a way that pixel data of respectivecolor components R, G and B constituting said color image data are addedat predetermined ratios; a contrivance in which a signal processingcircuit of said code-recognizing-data extraction means and a signalprocessing circuit of said recorded-image extraction means are connectedto an output side of said color image pickup means through an A/Dconverter and in parallel with each other, and said color image data isconcurrently processed by the signal processing circuits so as toseparate and extract the luminance data and said color data; and acontrivance in which decode means for recognizing and decoding theinformation expressed by said code, from the gray scale data iscomprised.

Besides, regarding the method, the objects of the present invention areaccomplished in such a way that a color imaging device is employed as animaging element of a code reading apparatus; that a one-dimensional ortwo-dimensional code which contains identification information forspecifying a subject for management, and color image data which containsthe subject for management, are inputted from the imaging device; thatpixel data constituting the color image data is concurrently processedby respective signal processing circuits for luminance extraction andfor color extraction, thereby to separate and extract luminance data andcolor data; that the information expressed by the code is recognized onthe basis of gray scale data formed of the luminance data of each pixel;and that said code and the original color image data of said subject formanagement can be recorded in mapping with each other.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram for explaining an example of a prior-art opticalinformation reading apparatus furnished with the function of readingimages;

FIG. 2 is a block diagram showing an example of the hardwarearchitecture of a code reading apparatus according to the presentinvention;

FIG. 3 is a block diagram showing the connection form between the codereading apparatus according to the present invention and an informationprocessing apparatus;

FIG. 4 is a perspective view showing an example of the exteriorconstruction of the code reading apparatus according to the presentinvention; and

FIG. 5 is an explanatory diagram showing examples of a code and asubject for management as are applied to the present invention.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

According to the present invention, in a code reading apparatus whichreads a code of one dimension or two dimensions in non-touching fashion,a two-dimensional color imaging device (or one-dimensional color imagingdevice) is employed as an imaging element, a subject for management andthe code for specifying the subject for management are imaged so as tobe confined within an identical imaging area, and luminance data forrecognizing the code and data for recording an original image areseparated and extracted from the RGB data of each of pixel positionsconstituting the color image data. Besides, gray scale data (achromaticscale data) for the code recognition, which corresponds to one pixel andwhich is constituted by the luminance data, and the color image data forthe original image recording, which is composed of the color data andthe luminance data, are respectively written into frame memories. Thus,the code recognition is permitted to proceed at a high precision, andthe original image of the subject for management can be easily recordedand managed in mapping with the code.

By way of example, the colored paper etc. which include such securitiesas bills, cheques, stock certificates and bonds, which have heretoforebeen managed with microfilm etc., are appropriately applied as thesubjects for management whose images are to be read. Apart from thepaper etc., colored three-dimensional objects may well be set as thesubjects for management.

The system architecture of the code reading apparatus is such that thecolor image data from the color image read means is branched andoutputted, that the branched and outputted color image data areconcurrently processed by respective circuits for luminance extractionand for color extraction, and that the gray scale data is written into afirst frame memory, while the original image data is written into asecond frame memory. Thus, it is possible to provide the code readingapparatus which has a comparatively inexpensive construction, which issmall in size and which is capable of coping with the color images.

Now, the preferred embodiments of the present invention will bedescribed in detail with reference to the drawings.

FIG. 2 shows an example of the hardware architecture of a code readingapparatus according to the present invention. The code reading apparatusshown in the figure includes a color imaging device as an imagingelement. A two-dimensional imaging device or one-dimensional imagingdevice of, for example, CCD type or MOS type is applied as the colorimaging device. In this example, a color two-dimensional area sensor 11(hereinbelow, termed the “color CCD”) is constructed by employing theCCD type two-dimensional imaging device.

On the output side of the color CCD 11, a luminance extraction circuit13 and a color extraction circuit 14 are connected in parallel throughan A/D (analog-to-digital) converter 12. An RGB signal from the colorCCD 11 is sent to both the luminance extraction circuit 13 and the colorextraction circuit 14 through the A/D converter 12 so as to beconcurrently processed. The luminance extraction circuit 13 is a circuitwhich extracts luminance data from pixel data (RGB data) subjected toA/D conversion, and which generates gray scale data as data forrecognizing a code. Here, the luminance data is evaluated by addingcolor components R, G and B at predetermined ratios. The gray scale dataformed of the luminance data extracted by the luminance extractioncircuit 13 is written into a gray scale frame memory 15, and codeinformation is recognized and decoded on the basis of the gray scaledata. Besides, the output line of the luminance extraction circuit 13 isconnected to the input side of the color extraction circuit 14, so thatthe luminance data extracted from the pixel data is sent to the colorextraction circuit 14.

The color extraction circuit 14 is a circuit which extracts color datafrom the RGB data subjected to the A/D conversion. The extracted colordata are written into color frame memories 16 as data for the originalimage of a subject for management, together with the luminance data fromthe luminance extraction circuit 13.

A CPU circuit unit 17 includes a CPU, a RAM, a ROM and an input/outputinterface, and it controls the drive of the color CCD 11 through a CCDdrive circuit 18. Further, the data for the code recognition and thedata for the original image written into the respective frame memories15, 16 are transmitted to an information processing apparatus under thecontrol of the CPU circuit unit 17. The recognition (decoding) of thecode based on the data for the code recognition (gray scale data) isexecuted on the side of the information processing apparatus or withinthe code reading apparatus.

FIG. 3 shows the connection form between the code reading apparatus 10and the information processing apparatus 20 (a host computer, a portabletype computer, or the like). The code reading apparatus 10 and theinformation processing apparatus 20 are connected through communicationmeans 3 (radio communication means or a communication cable). Theprocessing aspect of the data written into the frame memories of thecode reading apparatus 10 is not restricted to an aspect in which thedata are transmitted to the information processing apparatus 20 throughthe communication means 3 in real time. It is also allowed to employ anaspect in which data accumulation means for accumulating and recordingthe data in the RAM within the code reading apparatus 10 or in atransferable recording medium, such as memory card or PC card, isprovided, and in which the recognized data thus accumulated can becollectively processed in batch processing fashion. It is furtherallowed to employ an aspect in which both the above aspects can beselected and executed. Besides, the original color image may well behandled in a processing aspect in which it is transmitted to theexterior (such as the information processing apparatus 20) or isrecorded in the recording medium as mentioned above, by using the imagedata written into the frame memories as they are. It is also allowed toemploy a processing aspect in which the written image data arecompressed in conformity with an image compression technique such asJPEG (joint photographic experts group), and in which the original colorimage is transmitted to the exterior or is recorded in the recordingmedium by using the compressed data.

Besides, a code reading apparatus which is furnished with anaccumulating function and a communicating function, may well be soconstructed that an operator can use the apparatus by selecting one ofmodes (for example, a first mode for accumulating the data, a secondmode for transmitting the data in real time, and a third mode foraccumulating the data and also transmitting the data in real time).Further, the apparatus may well be so constructed that the dataaccumulated in the recording medium can be collectively or selectivelyaccepted in compliance with a transmission request from an externalcomputer side.

There will be described an operating example of the code readingapparatus of the above construction according to the present invention.FIG. 4 shows the exterior construction of the code reading apparatus.The code reading apparatus in this example is of the palm-top type whichan operator can operate with one hand. A read unit 10 a is disposed atthe extreme part of one end of the apparatus 10 proper. Disposed at theupper surface part of the other end of the apparatus 10 proper areten-key pads 10 b which serve to input commands for registering, erasingand displaying the data of the original image of a read subject formanagement and the data of the code thereof, and commands for guidanceetc., and a display unit 10 c which is made from a liquid crystal or thelike and which serves to display predetermined items.

In using this code reading apparatus, the operator adjusts an imagingrange while viewing a picture displayed on the display unit 10 c (or inaccordance with guide light projected on the subject to-be-imaged andindicating the imaging region) so that a two-dimensional code 2 and asubject for management 1 to-be-imaged as shown in FIG. 5 may fall withinthe imaging region of the code reading apparatus. Subsequently, theoperator instructs the apparatus 10 to accept an image, by depressing atrigger button 10 d which is disposed at the flank corner part of theapparatus 10 proper. Upon the depression of the trigger button 10 d,light reflected from a two-dimensional area is entered into a lenssystem, and a focused image is picked up by the color CCD 11. Besides,the R, G and B data of each pixel in the image data subjected to the A/Dconversion are sent to both the luminance extraction circuit 13 and thecolor extraction circuit 14.

In the luminance extraction circuit 13, the luminance data are extractedfrom the RGB data of individual pixel positions constituting the colorimage, and they are written into the gray scale frame memory 15 as thegray scale data of two-dimensional array (or one-dimensional array) andare sent to the color extraction circuit 14. Here, a luminance componentis extracted from the RGB data of each pixel in the color image. Theextraction of the luminance component, namely, the conversion from theRGB data into the luminance data is implemented by, for example, addingthe color components R, G and B at predetermined ratios as indicated bythe following formula 1:

Y=R+2G+B  (Formula 1)

where letters R, G and B denote the gradation values of each pixel, andletter Y denotes a luminance signal.

On the other hand, in the color extraction circuit 14, the RGB data areinputted from the A/D converter 12, color components are extracted inaccordance with predetermined operation expressions, for example,r=Y−2G−B, g=(Y−R−B)/2 and b=Y−2G−R, and the extracted color data and theluminance data from the luminance extraction circuit 13 are written intothe color frame memories 16 as the data for the original image of thesubject for management. In the CPU circuit unit 17, the data for theoriginal image (or the data for the original image and the data for thecode recognition) are compressed, and the compressed data are stored inthe RAM or the like storage means in mapping with the data for the coderecognition and are transmitted to the side of the informationprocessing apparatus 20 through the communication means 3.

Incidentally, although the code reading apparatus furnished with thetwo-dimensional area sensor has been exemplified in the foregoingembodiment, the two-dimensional area sensor is not restrictive, but aone-dimensional area sensor may well be employed. Besides, although thecode reading apparatus of the handy type and non-touching scheme hasbeen exemplified, the present invention shall also cover a code readingapparatus wherein a code is traced with a pen, a code reading apparatuswherein a head is brought into touch with a code, and a code readingapparatus of stationary scheme wherein a product or the like bearing acode is passed over a reading window.

As described above, according to the present invention, a color imagingdevice is employed as the imaging element of a code reading apparatus,the RGB signal of each of pixels constituting a color image is inputtedand is concurrently processed by respective circuits for coderecognition and for the color image, and gray scale data for the coderecognition and data for the original color image of a subject formanagement are accepted from one color image. Therefore, it is permittedto easily record and manage the original color images of the subjectsfor management in mapping with codes, and it is possible to provide thecode reading apparatus which has a comparatively inexpensiveconstruction, which is small in size and which is capable of coping withthe color images. Moreover, in separating and extracting a luminancecomponent and color components from an RGB signal, luminance data forthe code recognition is extracted by adding the pixel data of therespective color components R, G and B at predetermined ratios.Therefore, the code of one dimension or two dimensions can be recognizedat a high precision from the color image.

What is claimed is:
 1. In a code reader which reads a code of onedimension or two dimensions in non-touching fashion; a code reader forcolor images, comprising: a color image pickup means for picking up thecode and also a color image of a subject for management as is specifiedby-identification information contained in said code;code-recognizing-data extraction means for extracting luminance data (Y)in accordance with operation expressions, Y=R+2G+B from the color imagedata (R.G.B. data) picked up by said color image pickup means, and forwriting gray scale data into a first frame memory as data forrecognizing said code; and recorded-image extraction means forextracting color data (r.g.b. data) in accordance with operationexpressions r=Y−2G−B, g=(Y−R−B)/2 and b=Y−2G−R from said color imagedata picked up by said color image pickup means, and for writing thecolor data into a second frame memory as data for the original image ofthe subject for management.
 2. A code reader for color images as definedin claim 1, wherein a signal processing circuit of saidcode-recognizing-data extraction circuit and a signal processing circuitof said recorded-image extraction circuit are connected to an outputside of said color image pickup means through an A/D converter and inparallel with each other, and said color image data is concurrentlyprocessed by the signal processing circuits so as to separate andextract the luminance data and said color data.
 3. A code reader forcolor images as defined in claim 1, comprising decode means forrecognizing and decoding the information expressed by said code, fromthe gray scale data.
 4. A code reading method for color images,characterized in that a: color imaging device is employed as an imagingelement of a code reader; that a one-dimensional or two-dimensional codewhich contains identification information for specifying a subject formanagement, and color image data which contains the subject formanagement are inputted from the imaging device; that pixel data ofR.G.B. Constituting the color image data is concurrently processed byrespective signal processing circuits for luminance extraction and forcolor extraction, thereby to separate and extract luminance data (Y) inaccordance with operation expressions, Y=R+2G+B and color data (r.g.b.data) in accordance with operation expressions, r=Y−2G−B, g+(Y−R−B)/2and b=Y−2G−R; that the information expressed by the code is recognizedon the basis of gray scale data formed of the luminance data of eachpixel; and that said code and the original color image data of saidsubject for management can be recorded in mapping with each other.